package com.usian.fallback;

import com.usian.CatResult;
import com.usian.PageResult;
import com.usian.feign.ItemFeign;
import com.usian.pojo.*;
import feign.hystrix.FallbackFactory;
import org.springframework.stereotype.Component;

import java.util.List;
import java.util.Map;

@Component
public class ItemServiceFallBack  implements FallbackFactory<ItemFeign> {
    @Override
    public ItemFeign create(Throwable throwable) {
        return new ItemFeign() {
            @Override
            public TbItem selectItemInfo(Long itemId) {
                return null;
            }

            @Override
            public PageResult selectTbItemAllByPagePage(Integer page, Integer rows) {
                System.out.println("托底数据。。。。。。。。。。。。");
                return null;
            }

            @Override
            public List<TbItemCat> selectItemCategoryByParentId(Long id) {
                return null;
            }

            @Override
            public TbItemParam selectItemParamByItemCatId(Long itemCatId) {
                return null;
            }

            @Override
            public Integer insertTbitem(TbItem tbItem, String desc, String itemParams) {
                return null;
            }

            @Override
            public Map<String, Object> preUpdateItem(Long ItemId) {
                return null;
            }

            @Override
            public Integer updateTbItem(TbItem tbItem, String desc, String itemParams) {
                return null;
            }

            @Override
            public Integer deleteItemById(Long itemId) {
                return null;
            }


            @Override
            public PageResult selectItemParamAll(Integer page, Integer rows) {
                return null;
            }

            @Override
            public int insertItemParam(Long itemCatId, String paramData) {
                return 0;
            }

            @Override
            public int deleteItemParamById(Long id) {
                return 0;
            }


            @Override
            public CatResult selectItemCategoryAll() {
                return null;
            }

            @Override
            public TbItemDesc selectItemDescByItemId(Long itemId) {
                return null;
            }

            @Override
            public TbItemParamItem selectTbItemParamItemByItemId(Long itemId) {
                return null;
            }
        };
    }


}
